home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////
- // DEMONSTRATING METAS
- ////////////////////////////////////////////////////////
-
- // A meta is a piece of program, that contains another
- // piece of program.
- // you can think of it as a variable or macro.
-
- // Every meta has a name and a value.
- // To access the value of a meta, write it's name
- // between two percent characters.
-
- // Print the current date and time
- writeln "%date%"
- writeln "%time%"
-
- // If you like (or need) you may change the value-expansion
- // character
- meta $
- writeln "$date$"
- writeln "$time$"
-
- // But I like the % character best, so change it back.
- meta %
-
- // A very important system meta is lastline.
- // It contains the value after waiting for something, contains
- // a parameter if called from dial oder script, or it contains the
- // result of some script commands.
- // So: Whenever you expect data from somewhere look for it in %lastline%
-
- ask "Type something (or press ESC)"
- writeln "You typed '%lastline%'"
-
- request "What do you want?" "Wine" "Women" "Song"
- notify "Sorry, I have no '%lastline%'"
-
-